﻿using Basic.FormGatewaryModular.Interface;
using Basic.FormGatewaryModular.Model.UserForm;
using Basic.FormRemoteModel.UserForm.Model;
using WeDonekRpc.HttpApiGateway;
using WeDonekRpc.HttpApiGateway.Model;

namespace Basic.FormGatewaryModular.Api
{
    internal class UserFormApi : ApiController
    {
        private readonly IUserFormService _Service;

        public UserFormApi ( IUserFormService service )
        {
            this._Service = service;
        }
        public CalculateColState[] CalculateState ( LongParam<CalculateArg> param )
        {
            return this._Service.CalculateState(param.Id, param.Value);
        }
        public CalculateResult[] Calculate ( LongParam<CalculateArg> param )
        {
            return this._Service.Calculate(param.Id, param.Value);
        }
        public UserFormBody Get ( UserFormGet arg )
        {
            return this._Service.Get(arg, base.UserState);
        }
    }
}
